package org.nobody.mallb2c.mallmember.config;

import org.nobody.mallb2c.mallmember.interceptor.LoginUserInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 3489309323@qq.com
 * @create 2020-09-27-15:14
 */
@Configuration
public class MemberWebConfig implements WebMvcConfigurer {
  @Autowired
  LoginUserInterceptor loginUserInterceptor;

  @Override
  public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(loginUserInterceptor).addPathPatterns("/**");
  }
}
